import { createRouter, createWebHistory } from 'vue-router'
import AreaSelector from '@/components/AreaSelector.vue'
import ApiTest from '@/components/ApiTest.vue'
import DebugPanel from '@/components/DebugPanel.vue'
import DifyWorkflowChat from '@/components/DifyWorkflowChat.vue'
import StreamingChat from '@/components/StreamingChat.vue'
import ConfigSettings from '@/components/ConfigSettings.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      redirect: '/area-selector'
    },
    {
      path: '/area-selector',
      name: 'area-selector',
      component: AreaSelector,
      meta: {
        title: '地区选择器'
      }
    },
    {
      path: '/api-test',
      name: 'api-test',
      component: ApiTest,
      meta: {
        title: 'API 测试'
      }
    },
    {
      path: '/debug',
      name: 'debug',
      component: DebugPanel,
      meta: {
        title: '调试面板'
      }
    },
    {
      path: '/dify-chat',
      name: 'dify-chat',
      component: DifyWorkflowChat,
      meta: {
        title: 'Dify 工作流聊天'
      }
    },
    {
      path: '/streaming-chat',
      name: 'streaming-chat',
      component: StreamingChat,
      meta: {
        title: '流式聊天接口'
      }
    },
    {
      path: '/config-settings',
      name: 'config-settings',
      component: ConfigSettings,
      meta: {
        title: '配置设置初始化'
      }
    }
  ],
})

export default router
